home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / intuition / menu / popupm10.lha / PopUpMenuClass_1.0 / include / PopUpMenuClass.h < prev   
Encoding:
C/C++ Source or Header  |  1993-12-23  |  2.2 KB  |  90 lines

  1. #ifndef PUMG_CLASS_H
  2. #define PUMG_CLASS_H 1
  3. /** ** *** MakeRev Header *** **
  4. **
  5. **  ** PopupMenuClass - BOOPSI Popup menu. **
  6. **
  7. **  Copyright © 1993,1994 Markus Aalto
  8. **
  9. **  Creation date: 09-Dec-93
  10. **
  11. **  ------------------------------------------------------------------
  12. **  $Filename: PopUpMenuClass.h $
  13. **  $Revision: 1.0 $
  14. **  $Date: 23-Dec-93 $
  15. **
  16. **  $Author: Markus Aalto $
  17. **  $Comment: Distributed under the GNU General Public Licence. $
  18. **
  19. */
  20.  
  21. #include <exec/types.h>
  22. #include <exec/memory.h>
  23. #include <exec/lists.h>
  24. #include <exec/libraries.h>
  25.  
  26. #include <graphics/gfxmacros.h>
  27. #include <graphics/regions.h>
  28.  
  29. #include <intuition/intuition.h>
  30. #include <intuition/classusr.h>
  31. #include <intuition/gadgetclass.h>
  32. #include <intuition/icclass.h>
  33. #include <intuition/imageclass.h>
  34.  
  35. #include <utility/tagitem.h>
  36.  
  37. #include <stdlib.h>
  38.  
  39. #include <proto/all.h>
  40.  
  41. extern  Class *CreatePopUpMenuClass( void );
  42. extern  BOOL DisposePopUpMenuClass( Class *cl );
  43.  
  44. #define PUMG_TAGBASE            (TAG_USER + 700)
  45.  
  46. /*  Text in Exec List. (ISG--) */
  47. #define PUMG_Labels             (PUMG_TAGBASE)
  48.  
  49. /*  Active item in Labels list. (ISGNU) */
  50. #define PUMG_Active             (PUMG_TAGBASE+1)
  51.  
  52. /*  TextFont we use for Texts. (ISG--) */
  53. #define PUMG_TextFont           (PUMG_TAGBASE+2)
  54.  
  55.  
  56. /* Predefined Minimum dimensions for safe operation. */
  57. #define PUMG_MinWidth           28
  58. #define PUMG_MinHeight          8
  59.  
  60. /*****************************************************/
  61. /* Private data, do NOT USE this outside class code. */
  62. /*****************************************************/
  63. #ifdef POPUPMENUCLASS_PRIVATE
  64.  
  65. #define PUMG_SetTagArg(tag, id, data)   {tag.ti_Tag = (ULONG)(id);\
  66.                                         tag.ti_Data = (ULONG)(data);}
  67.  
  68. typedef ULONG (*HookFunction)(void);
  69.  
  70. typedef struct {
  71.     struct  List *Labels;
  72.     UWORD   Active;
  73.     UWORD   Count;
  74.  
  75.     /* For rendering. */
  76.     struct  Image *FrameImage;
  77.     struct  TextFont *Font;
  78.  
  79.     /* Temporary data for PopupMenu. */
  80.     UWORD   FitsItems;
  81.     BOOL    ActiveFromMouse;
  82.     UWORD   Temp_Active;
  83.     struct  Window *popup_window;
  84.     struct  Rectangle rect;
  85. } PUMGData;
  86.  
  87. #endif      /* POPUPMENUCLASS_PRIVATE */
  88.  
  89. #endif      /* PUMG_CLASS_H */
  90.